package org.lh.ibernate.core;

import org.lh.ibernate.core.tools.ParameterLink;

import javax.xml.transform.Result;
import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.util.List;

/*
 *
 * @author idea
 * @date 2018/7/12
 * @param Method method,Object[] args
 * @return Object
 * @des session工具
 */
public interface ISessionUtil<T,PK> {
    void save(T obj) throws Exception;

    void update(Object obj,PK pk)throws Exception;

    void delete(Class<T>  clazz,PK pk) throws Exception;

    T findOne(T obj,PK pk) throws Exception;

    List<T> findAll(Class<T> clazz) throws Exception;

    List<T> queryCustom(String sql, ParameterLink parameterLink) throws Exception;

    List<T> batchInsert(List<T> objList) throws Exception;

    List<T> queryCallHandle(String callSql) throws Exception;

}
